/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: #1890ff;
}

.logo i {
    margin-right: 8px;
    font-size: 24px;
}

/* 导航样式 */
.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin: 0 10px;
}

.main-nav a {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.main-nav a:hover {
    color: #1890ff;
    background-color: #f0f7ff;
}

.main-nav li.active a {
    color: #1890ff;
    background-color: #e6f7ff;
    font-weight: 500;
}

.main-nav a i {
    margin-right: 5px;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
}

.welcome {
    margin-right: 10px;
    color: #666;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
}

/* 主内容区域 */
.main-content {
    margin-top: 60px;
    padding: 20px 0;
    min-height: calc(100vh - 120px);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background-color: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-primary:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
}

.btn-secondary:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
}

/* 页脚样式 */
.main-footer {
    background-color: #fff;
    padding: 20px 0;
    text-align: center;
    color: #999;
    border-top: 1px solid #f0f0f0;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 16px;
    color: #333;
    font-weight: 500;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 18px;
}

/* 段落样式 */
p {
    margin-bottom: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .main-nav ul {
        margin: 10px 0;
        justify-content: center;
        flex-wrap: wrap;
    }

    .main-nav li {
        margin: 5px;
    }

    .user-info {
        margin-top: 10px;
    }

    .main-content {
        margin-top: 180px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.upcoming {
    background-color: #e6f7ff;
    color: #1890ff;
}

.status-badge.ongoing {
    background-color: #f6ffed;
    color: #52c41a;
}

.status-badge.completed {
    background-color: #f5f5f5;
    color: #999;
}

.status-badge.canceled {
    background-color: #fff2e8;
    color: #fa8c16;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-group input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group.full-width {
    width: 100%;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}